export class Node {
    constructor(public id, public parentId, public nodeType) {

    }
}

export class CategotyNode extends Node {
    constructor(
        public id: string,
        public name: string,
        public color: string,
        public backgroudColor: string) {
        super(id, undefined, 0);
    }
}

export class ProductNode extends Node {
    constructor(
        public id: string,
        categoryId: string,
        public productId: string,
        public exchange: string) {
        super(id, categoryId, 1);
    }
}

export class PriceNode extends ProductNode {
    constructor(
        public id: string,
        parentProductId: string,
        public productId: string,
        public exchange: string) {
        super(id, parentProductId, productId, exchange);
        this.nodeType = 2;
    }
}

